package cn.chenbonian.crowdfunding.mapper;

import cn.chenbonian.crowdfunding.entity.po.ProjectPO;
import cn.chenbonian.crowdfunding.entity.po.ProjectPOExample;
import cn.chenbonian.crowdfunding.entity.vo.DetailProjectVO;
import cn.chenbonian.crowdfunding.entity.vo.PortalTypeVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProjectPOMapper {

  void insertTypeRelationship(
      @Param("typeIdList") List<Integer> typeIdList, @Param("projectId") Integer projectId);

  void insertTagRelationship(
      @Param("tagIdList") List<Integer> tagIdList, @Param("projectId") Integer projectId);

  int countByExample(ProjectPOExample example);

  int deleteByExample(ProjectPOExample example);

  int deleteByPrimaryKey(Integer id);

  int insert(ProjectPO record);

  int insertSelective(ProjectPO record);

  List<ProjectPO> selectByExample(ProjectPOExample example);

  ProjectPO selectByPrimaryKey(Integer id);

  int updateByExampleSelective(
      @Param("record") ProjectPO record, @Param("example") ProjectPOExample example);

  int updateByExample(
      @Param("record") ProjectPO record, @Param("example") ProjectPOExample example);

  int updateByPrimaryKeySelective(ProjectPO record);

  int updateByPrimaryKey(ProjectPO record);

  List<PortalTypeVO> selectPortalTypeVOList();

  DetailProjectVO selectDetailProjectVO(Integer projectId);
}
